import com.itheima.domain.Account;
import com.itheima.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus;

/**
 * @program: Spring_day01_01_IOC入门程序
 * @description:  演示编程式事务控制
 * @author: xuejingjing
 * @create: 2021-08-06 11:51
 **/
public class App {
    public static void main(String[] args) {
     ApplicationContext act = new ClassPathXmlApplicationContext("applicationContext.xml");
        AccountService accountService = (AccountService) act.getBean("accountService");
       //实现jack1账户转给jack2账户，100元
        //此时jack1 1100 ====jack2 900
        accountService.transfer("jack1","jack2",100D);
       }
    }
